    $(document).ready(function(){
    	$("#dept").hide();
	    var grid=$("#grid-data").bootgrid({
	    	navigation:2,
  			columnSelection:false,
		    ajax:true,
		    url:"setupprocess",
		    formatters: {
		    "commands": function(column, row)
		    {
		            return "<a class=\"btn btn-xs btn-default ajax-link\" target=\"_blank\" href=\"traceprocess/" + row.processInstanceid + "\">查看详情</a>";
		    },
		    "deleteProcess":function(column, row){
	            return "<button type=\"button\" class=\"btn btn-xs btn-info command-delete\" data-row-id=\"" + row.processInstanceid + "\">删除流程</button>";
		    	//return "<a class=\"btn btn-xs btn-default ajax-link\" target=\"_blank\" href=\"deleteprocess/" + row.processInstanceid + "\">删除流程</a>";
		    }
	    	}
	    
	    }).on("loaded.rs.jquery.bootgrid", function()
	    		{
	    	grid.find(".command-delete").on("click", function(e)
				    {
				        $.post("deleteprocess",{processInstanceid:$(this).data("row-id")},function(){
				        	alert("删除成功");
				        	$("#grid-data").bootgrid("reload");
				        });
				    });
	    });
	  });
	  
	   
